/**
 * Created by Administrator on 2017/4/26.
 */
import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View
} from 'react-native';
export default class EIComponent extends Component {
    constructor(props){
        super(props);
        //state 是一个对象
        this.state={
             count:0,
        }
    }


    render() {
        console.log("--------render-------")
        return <View>
            <Text>
                我的状态快点改变吧
            </Text>
            <Text style={{fontSize:20,backgroundColor:'red'}}
                  onPress={()=>{
                     this.setState({
                         count:this.state.count+1,
                     });
                  }}
            >我点击了{this.state.count}次</Text>
        </View>
    }

}